﻿using System;
using Vbyte.SharpOrm.Config;
using System.Collections;
using System.Collections.Generic;
using System.Data.Common;
using Vbyte.SharpOrm;

namespace NUnitTest
{
    /// <summary>
    /// 产品/业务实例
    /// </summary>
    [Serializable]
    [BindTable(BindConnectionKey = "DefaultDB",
        Tables = new object[] { "gw_Publish_Product", "gw_General_ProductClass", SQLTableLink.InnerJoin, "gw_Publish_Product.PC_ID=gw_General_ProductClass.PC_ID" 
        })]
    public class ProductListSummary : TableEntry
    {
        [PrimaryKey]
        public long ProductID { get; set; }
        /// <summary>
        /// 获取或设置产品名称
        /// </summary>
        /// <value>The name of the product.</value>
        public string ProductName { get; set; }

        /// <summary>
        /// 产品分类编号
        /// </summary>
        /// <value>The PCID.</value>
        [TableItem("PC_ID")]
        [ForeignKey]
        public short PCID { get; set; }

        /// <summary>
        /// 分类名称
        /// </summary>
        [TableItem("GW_General_ProductClass", "PC_Name")]
        public string PCName { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        [TableItem("P_Code")]
        public string PCode { get; set; }

        /// <summary>
        /// 运营商编号
        /// </summary>
        public int ISP_ID { get; set; }

        /// <summary>
        /// 运营商业务代码
        /// </summary>
        public string ISP_Code { get; set; }

        /// <summary>
        /// 产品状态编号
        /// </summary>
        public int PS_ID { get; set; }
    }
}
